//*****************************************************************************
//*****************************************************************************
// 		Link Control Interface Data
//
//*****************************************************************************

//=============================================================================
//	API name:	SRCI_SV_RFLM_Version
//=============================================================================
//	SRCI_SV_RFLM_Version:
//	(_RFLM_majorVersion<<8) | (_RFLM_minorVersion<<4) | (_RFLM_developmentVersion<<0)


//=============================================================================
//	API name:	SRCI_SV_RFLP_RFchannelSequenceLength
//=============================================================================
//	bits 5:0	: number of channels in hopping sequence
//	SRCI_SV_RFLP_RFchannelSequenceLength:    _RFLP_RFchannelSequenceLength


//=============================================================================
//	API name:	SRCI_SV_RFLM_NetworkID
//=============================================================================
//	SRCI_SV_RFLM_NetworkID:				@ = @ + 1


//=============================================================================
//	API name:	SRCI_SV_RFLM_State
//=============================================================================
	RFLM_State:						@ = @ + 1

//=============================================================================
//	API name:	SRCI_SV_RFLM_PollCycleClock
//=============================================================================
//	SRCI_SV_RFLM_PollCycleClock:			@ = @ + 1

//=============================================================================
//	API name:	SRCI_SV_RFLM_Slot0_ConnectionStatus
//=============================================================================
//SRCI_SV_RFLM_ConnectionStatus:
//	SRCI_SV_RFLM_Slot0_ConnectionStatus:		@ = @ + 1

//=============================================================================
//	API name:	SRCI_SV_RFLM_Slot1_ConnectionStatus
//=============================================================================
//	SRCI_SV_RFLM_Slot1_ConnectionStatus:		@ = @ + 1


//=============================================================================
//	API name:	SRCI_SV_RFLM_enable_AFH
//=============================================================================
//	SRCI_SV_RFLM_enable_AFH:			@ = @ + 1
	





//NOTE!!!!!
//	ALL OF THE FOLLOWING STATS AND INFORMATION ARE VALID AFTER THE RF POLL CYCLE CLOCK HAS TRANSITIONED
//	AND ARE VALID FOR 4MS.
//end note
//SRCI_SV_RFLP_RFchannelSequence_pntr is used to index into all of the buffer stats

//=============================================================================
//	API name:	SRCI_SB_RFLP_RFchannelSequenceTable
//=============================================================================
//This is the sequence table that tells the hopping sequence.
//There are 4 RF channels that are always used for fast connection signalling
//The other channels can be selected randomly or by RSSI spectrum scans
	SRCI_CB_RFLP_RFchannelSequenceTable:
//	SRCI_SB_RFLP_RFchannelSequenceTable:	@ = @ + _RFLP_RFchannelSequenceLength

//=============================================================================
//	API name:	SRCI_SV_RFLP_RFchannelSequence_pntr
//=============================================================================
//This is pointer used to index into "RFLP_RFchannelSequenceTable"
//this is the pntr into the RFLP_RFchannelSequenceTable that gives the currently used RF channel
	SRCI_SV_RFLP_RFchannelSequence_pntr:	@ = @ + 1

//=============================================================================
//	API name:	SRCI_SV_RFLP_Slot0_MissedResponseCounter
//=============================================================================
//SRCI_SV_RFLP_MissedResponseCounter:
//	SRCI_SV_RFLP_Slot0_MissedResponseCounter:	@ = @ + 1

//=============================================================================
//	API name:	SRCI_SV_RFLP_Slot1_MissedResponseCounter
//=============================================================================
//	SRCI_SV_RFLP_Slot1_MissedResponseCounter:	@ = @ + 1

//=============================================================================
//	API name:	SRCI_SV_RFLP_AFH_EventCounter
//=============================================================================
//This counter will increment whenever the Adaptive Frequency Hopping algorithm adapts its channel sequence
//	SRCI_SV_RFLP_AFH_EventCounter:		@ = @ + 1






LargeSB_start:

//=============================================================================
//	API name:	SRCI_SV_RFLP_slot0RSSI
//=============================================================================
//	SRCI_SV_RFLP_slot0_RSSI:			@ = @ + _RFLP_RFchannelSequenceLength
//
////=============================================================================
////	API name:	SRCI_SV_RFLP_slot0RSSI
////=============================================================================
//	SRCI_SV_RFLP_slot1_RSSI:			@ = @ + _RFLP_RFchannelSequenceLength
//
//
////=============================================================================
////	API name:	SRCI_SB_RFLP_Slot0_RFChannelQualityTable
////=============================================================================
////This is a table that keeps stats of the last (16*15) slave0 responses
////a '1' means that a packet was missed
//	SRCI_SB_RFLP_Slot0_RFChannelQualityTable:	@ = @ + _RFLP_RFchannelSequenceLength
//
////=============================================================================
////	API name:	SRCI_SB_RFLP_Slot1_RFChannelQualityTable
////=============================================================================
////This is a table that keeps stats of the last (16*15) slave1 responses
////a '1' means that a packet was missed
//	SRCI_SB_RFLP_Slot1_RFChannelQualityTable:	@ = @ + _RFLP_RFchannelSequenceLength




LargeSB_end:

//-----------------------------------------------
//ChannelID
//	ID needed to access a connection initiated by the master device
//	ChannelID can be used as "Mating IDs"
//	The ChannelID is transmitted by the master device and is used to encode all packet checksums
	RFLP_ChannelID:					@ = @ + 1		//16 bit


//-----------------------------------------------
	RFLP_Slv0NodeID:					@ = @ + 1
	RFLP_Slv1NodeID:					@ = @ + 1
	RFLP_Slv2NodeID:					@ = @ + 1
	RFLP_MstrNodeID:					@ = @ + 1


//-----------------------------------------------
//RFLinkManager_ThreadB_Status
//variable used by ThreadA and ThreadB to communicate
	RFLinkManager_ThreadB_Status:			@ = @ + 1


//-----------------------------------------------
//RFLP_MAPtransferEnable
//Control variable used by RFLinkManager_ThreadA to enable or disable the transfer of MAPs
//-1 = MAP transfer enabled
//0  = NO MAP transfer (not even null packets)
	RFLP_MAPtransferEnable:				@ = @ + 1


//-----------------------------------------------
//RFLP_RFchannelHopGuide
//RF channel guide sent in the Mstr Poll Packet
	RFLP_RFchannelHopGuide:				@ = @ + 5

//-----------------------------------------------
//RFLP_MstrDataMsg
//data message that will be sent the next RF poll cycle
	RFLP_MstrDataMsg:					@ = @ + 2

//-----------------------------------------------
//RFLP_Slot0ResponseStatus
// -1 = no valid response
// 0	= valid response
// 1	= corrupt response
	RFLP_Slot0ResponseStatus:			@ = @ + 1
//-----------------------------------------------
//RFLP_Slot0ResponseParameters
//response data received in slave response slot0
// ACK Vector
// data message valid flag | Extended Message Request
// Message ID
// Audio ACK Vector
// Message Data
	RFLP_Slot0ResponseParameters:			@ = @ + 8

//-----------------------------------------------
//RFLP_Slot1ResponseStatus
// -1 = no valid response
// 0	= valid response
// 1	= corrupt response
	RFLP_Slot1ResponseStatus:			@ = @ + 1
//-----------------------------------------------
//RFLP_Slot1ResponseParameters
//response data received in slave response slot0
// ACK Vector
// data message valid flag | Extended Message Request
// Message ID
// Audio ACK Vector

//this counter is incremented every time that the active mode is called from standby
	RFLP_ActiveStateCounter:			@ = @ + 1



	RFLP_MstrPollCycleStartTime_BBUticks:	@ = @ + 1


//-----------------------------------------------
//This is pointer used to index into "RFLP_RFchannelSequenceTable"
//this is used by routines after the channel has been updated but before the new poll cycle has started
	RFLP_RFchannelSequence_pntr_old:		@ = @ + 1

//-----------------------------------------------
//this determines whether to use "odd" or "even" channel set
//	RFLP_RFchannelTableSelection:			@ = @ + 1

//-----------------------------------------------
//This is pointer used to index into "RFLP_RFchannelPool"
	RFLP_RFchannelPool_pntr:		@ = @ + 1
//-----------------------------------------------
//This is the RF channels that are not currently is use.
//The AFA selects channels from this "pool"
//	RFLP_RFchannelPool:			@ = @ + (_RFLP_RFchannelNumberTotal - _RFLP_RFchannelSequenceLength)



	RFLP_periodic_AFA_EventCounter:	@ = @ + 1






//==============================================================
//		ML2727 PLL configuration register table for odd PLL channels
//		use this table for "odd mating ID's"
RFchannelRegisterTable_odd:			@ = @ + 38
//		_RFchannel0_odd<<4
//		_RFchannel1_odd<<4
//		_RFchannel2_odd<<4
//		_RFchannel3_odd<<4
//		_RFchannel4_odd<<4
//		_RFchannel5_odd<<4
//		_RFchannel6_odd<<4
//		_RFchannel7_odd<<4
//		_RFchannel8_odd<<4
//		_RFchannel9_odd<<4
//		_RFchannel10_odd<<4
//		_RFchannel11_odd<<4
//		_RFchannel12_odd<<4
//		_RFchannel13_odd<<4
//		_RFchannel14_odd<<4
//		_RFchannel15_odd<<4
//		_RFchannel16_odd<<4
//		_RFchannel17_odd<<4
//		_RFchannel18_odd<<4
//		_RFchannel19_odd<<4
//		_RFchannel20_odd<<4
//		_RFchannel21_odd<<4
//		_RFchannel22_odd<<4
//		_RFchannel23_odd<<4
//		_RFchannel24_odd<<4
//		_RFchannel25_odd<<4
//		_RFchannel26_odd<<4
//		_RFchannel27_odd<<4
//		_RFchannel28_odd<<4
//		_RFchannel29_odd<<4
//		_RFchannel30_odd<<4
//		_RFchannel31_odd<<4
//		_RFchannel32_odd<<4
//		_RFchannel33_odd<<4
//		_RFchannel34_odd<<4
//		_RFchannel35_odd<<4
//		_RFchannel36_odd<<4
//		_RFchannel37_odd<<4

//-----------------------------------------------
//NetworkID
//	ID used to Scramble all packets
//	NetworkIDs can be assigned to specific customers to prevent interoperability
//	The NetworkID is a secret key that is not transmitted across the link
	RFLP_NetworkID:				@ = @ + 1






PowerScalingFlag:				@ = @ + 1





//this is used by the master device
//the channels with the * are used by the slave as special call channels
//it listens to these channels more often then the rest
	SRCI_SB_RFLP_RFchannelSequenceTable_initial:
		5	//0
		9	//1
		1	//2	*
		2	//3
		12	//4
		7	//5
		10	//6	*
		17	//7
		20	//8
		27	//9 	
		30	//10	*
		25	//11
		35	//12
		36	//13	
		24	//14	*
		33	//15
		29	//16
		23	//17	
		31	//18	*
		13	//19




	RFLP_RFchannelPool_initial:
		0
		37
		22
		18
		4
		6
//		33
		8
		26
		11
//		13
		34
		15
		32
		16
//		29
		19
		21
		3
//		23
		28
		14
//		31














